package com.yanqu.road.server.cmd.match;

import com.yanqu.road.pb.variety.VarietyProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.server.protocol.GameProtocol;

/**
 * @author ：zfr
 * @date ：2021/2/20 15:46
 */
@Cmd(code = GameProtocol.S_VARIETY_SYNC_VARIETY_DETAIL_DATA, desc = "同步杂艺详细数据")
public class SyncVarietyDetailCmd extends AbstractCommand {
    private VarietyProto.SyncVarietyDetailReqMsg msg;
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        msg = VarietyProto.SyncVarietyDetailReqMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        player.sendPacket(CrossProtocol.C_VARIETY_SYNC_VARIETY_DETAIL_DATA, msg.toBuilder());
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
